/**
* @Author: zmx
* @Date: 2023/9/26
* @Description:
*/
<template>
  <el-dialog title="确认禁用" :visible.sync="show" append-to-body width="30%" :before-close="handleClose">
    <el-form :model="formInline">
      <el-form-item label="禁用原因：">
        <el-input v-model="formInline.actionDesc" placeholder="请输入禁用原因"></el-input>
      </el-form-item>
    </el-form>
    <span slot="footer" class="dialog-footer">
      <el-button type="primary" @click="checkBtn">确 认</el-button>
      <el-button @click="handleClose">取 消</el-button>
    </span>
  </el-dialog>
</template>

<script>
export default {
  props: ['ConfirmDialogShow'], //接受父组件传递过来的数据
  data() {
    return {
      show: false, //弹窗默认隐藏
      formInline: {
        actionDesc:'',
      },
    };
  },
  mounted() {
    //显示弹窗
    this.show = this.ConfirmDialogShow
  },
  methods: {
    handleClose() {
      //关闭弹窗
      this.show = false
      this.$emit('closeDialog')
    },
    checkBtn() {
      //确定按钮
      this.$emit('selectData', this.formInline.actionDesc)   //发送数据到父组件
      this.handleClose()
    }
  }
};
</script>

<style scoped>

</style>
